<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <div>
      <input type="text" v-model="num1">
      +
      <input type="text" v-model="num2">
      <button @click="add">=</button>
      <span>{{result}}</span>
    </div>
  </div>
  <script type="text/javascript" src="js/vue.js"></script>
  <script type="text/javascript">
    
    var vm = new Vue({
      el: '#app',
      data: {
        num1: 0,
        num2: 0,
        result: 0
      },
      methods: {
        add: function(){
          this.result = parseInt(this.num1) + parseInt(this.num2)
        }
      }
    });
  </script>
</body>
</html>
